Skip to content

feat: known-failures (xfail) list for expected failures - #29

Merged
svlachakis merged 1 commit into
mainfrom
feat/known-failures-xfail
Jul 1, 2026
Merged

feat: known-failures (xfail) list for expected failures#29
svlachakis merged 1 commit into
mainfrom
feat/known-failures-xfail

Conversation

@svlachakis

Copy link
Copy Markdown

Why

Several rpc-int diffs are "correct behavior pending someone else's merge/release" — Nethermind is right, and the fix is an open NM or geth PR. We don't want the job red while waiting, but we also don't want to lose coverage or forget to clean up once the fix lands.

What

Adds an expected-failures (xfail) listknown-failures.json at the repo root — keyed by "<api>/<test>" (extension-insensitive), each linked to its tracking PR:

{
  "eth_getBalance/test_40": { "pr": "ethereum/go-ethereum#35271", "note": "geth -32000 vs NM -32602 for empty {} block param; geth-side fix" }
}

Listed tests still run, but:

  • a listed test that failsKNOWN_FAIL (<pr>), does not fail the run;
  • a listed test that passesUNEXPECTED_PASS warning (the fix likely landed — remove the entry); with --strict-known-failures this fails the run to force cleanup.

The exit code stays keyed on real (non-known) failures, so a genuine new regression still turns the job red. This is strictly better than excluding/skipping: coverage is preserved and you're told the moment a fix lands.

New flags: --known-failures <path> (default known-failures.json), --strict-known-failures.

Seed entries (6, all with fixes in flight)

Tests

LoadKnownFailures (missing file → empty, parse + key normalization, invalid JSON errors) and NormalizeTestKey. go build ./... + full go test ./... pass.

🤖 Generated with Claude Code

Add known-failures.json (repo root) listing tests expected to fail while a fix
is pending, each linked to its PR. Listed tests still run, but:
- a failure is reported as KNOWN_FAIL and does not fail the run;
- an unexpected pass is reported as UNEXPECTED_PASS (warn), or fails the run with
  --strict-known-failures to force cleanup.

Keeps the job green while upstream/NM fixes are in flight, preserves coverage, and
flags the moment a fix lands. Exit code stays keyed on real (non-known) failures.

Seeded with the 6 currently-pending diffs (NM #12003; geth #35271/#35129/#35228).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@svlachakis
svlachakis merged commit c357755 into main Jul 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant